package cn.dhnep.demo.controller;


import cn.dhnep.demo.pojo.vo.RespPageBean;
import cn.dhnep.demo.service.PackageOrderService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author dhn
 * @since 2021-09-06
 */
@RestController
@RequestMapping("/dhn/message")
public class PackageOrderController {

    @Resource
    private PackageOrderService packageOrderService;

    @ApiOperation("交货订单查询")
    @GetMapping("getAllPackageOrder")
    public RespPageBean getAllPackageOrder(@RequestParam(defaultValue = "1") Integer page,
                                           @RequestParam(defaultValue = "10") Integer limit,
                                           @RequestParam(value = "status", required = false) String status,
                                           @RequestParam(value = "orderNumber", required = false) String orderNumber,
                                           @RequestParam(value = "horseman", required = false) String horseman,
                                           @RequestParam(value = "recycleNumber", required = false) String recycleNumber,
                                           @RequestParam(value = "recycleName", required = false) String recycleName) {
        return packageOrderService.getAllPackageOrder(page, limit, status, orderNumber, horseman, recycleNumber, recycleName);
    }

}

